﻿using System.Collections.Generic;
using System.Collections.ObjectModel;
using LinqToLdap.Mapping;

namespace LinqToLdap.Samples.Core.Domain
{
    [DirectorySchema("o=University of Washington,c=US", ObjectClass = "uwPerson")]
    public class Person
    {
        private ICollection<string> _titles;
        [DirectoryAttribute("title")]
        public ICollection<string> Titles
        {
            get { return _titles ?? (_titles = new Collection<string>()); }
            set { _titles = value; }
        }

        private ICollection<string> _phoneNumbers;
        [DirectoryAttribute("telephonenumber")]
        public ICollection<string> PhoneNumbers
        {
            get { return _phoneNumbers ?? (_phoneNumbers = new Collection<string>()); }
            set { _phoneNumbers = value; }
        }

        [DistinguishedName]
        public string DistinguishedName { get; set; }

        [DirectoryAttribute("givenname")]
        public string FirstName { get; set; }

        [DirectoryAttribute("sn")]
        public string LastName { get; set; }

        [DirectoryAttribute("cn")]
        public string CommonName { get; set; }

        [DirectoryAttribute("mail")]
        public string Email { get; set; }

        [DirectoryAttribute]
        public string PostalAddress { get; set; }

        [DirectoryAttribute]
        public string MailStop { get; set; }
    }
}
